package bignum_;

import java.math.BigDecimal;

/**
 * @author wly
 * @version V1.0.0
 * @date 2022/12/23 19:38
 */
public class BigDecimal01 {
    public static void main(String[] args) {
        BigDecimal b1 = new BigDecimal("1234123.1234123412343155441541233");
        System.out.println(b1);
//        System.out.println(Math.PI);
//        java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
//        System.out.println(b1.divide(new BigDecimal("3.3333")));
        System.out.println(b1.divide(new BigDecimal("3.3333"), BigDecimal.ROUND_CEILING));
        System.out.println(b1.toString());
        System.out.println(b1.toPlainString());
    }
}
